All Questions
4 questions
7votes
1answer
4kviews
Given a string containing just parentheses, determine if the input string is valid
The task is taken from leetcode Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: ...
1vote
1answer
314views
Check whether string of brackets are well-formed
The task I asked similar questions here and here. Given a string of round, curly, and square open and closing brackets, return whether the brackets are balanced (well-formed). For example, ...
4votes
2answers
1kviews
Check whether string of braces, brackets, and parentheses is balanced
The Task is taken from codewars: Write a function that takes a string of braces, and determines if the order of the braces is valid. It should return true if ...
1vote
2answers
2kviews
Minimum number of parentheses to be removed to make a string of parentheses balanced
The task: Given a string of parentheses, write a function to compute the minimum number of parentheses to be removed to make the string valid (i.e. each open parenthesis is eventually closed). ...